﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Linq;
using System.ServiceProcess;


namespace CentrisScraper.WindowsService
{
    [RunInstaller(true)]
    public partial class ProjectInstaller : Installer
    {
        public ProjectInstaller()
        {
            InitializeComponent();
            Committed += WindowsServiceInstallerCommitted;
        }

        protected void WindowsServiceInstallerCommitted(object sender, InstallEventArgs e)
        {
            var controller = new ServiceController(serviceInstaller.ServiceName);
            controller.Start();
        }
    }
}
